-- GENERATED SPELL FOR [Phoenix-Hawk] --


function spell0_20039(pUnit, Event) --@Dive,n/a--
pUnit:FullCastSpellOnTarget(37156,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20039', 640, 1)
end

function spell1_20039(pUnit, Event) --@Mana Burn,n/a--
pUnit:FullCastSpellOnTarget(37159,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20039', 569, 1)
end

function Sorts_20039(pUnit, Event)
local choix_sorts_20039 = math.random(0, 1)
if choix_sorts_20039 == 0 then
pUnit:RegisterEvent('spell0_20039', 1, 1)
end
if choix_sorts_20039 == 1 then
pUnit:RegisterEvent('spell1_20039', 1, 1)
end
end

function mob20039_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_20039', math.random(1500, 3000), 1)
end

function mob20039_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20039_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20039_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(20039, 1, 'mob20039_Action')
RegisterUnitEvent(20039, 2, 'mob20039_Leave')
RegisterUnitEvent(20039, 3, 'mob20039_Kill')
RegisterUnitEvent(20039, 4, 'mob20039_Die')
